Question: $ D = \left[\begin{array}{rrr}5 & 0 & 3 \\ 0 & 5 & 2\end{array}\right]$ $ w = \left[\begin{array}{r}4 \\ -2 \\ 0\end{array}\right]$ What is $ D w$ ?
Solution: Because $ D$ has dimensions $(2\times3)$ and $ w$ has dimensions $(3\times1)$ , the answer matrix will have dimensions $(2\times1)$ $ D w = \left[\begin{array}{rrr}{5} & {0} & {3} \\ {0} & {5} & {2}\end{array}\right] \left[\begin{array}{r}{4} \\ {-2} \\ {0}\end{array}\right] = \left[\begin{array}{r}? \\ ?\end{array}\right] $ To find the element at any row $i$ , column $j$ of the answer matrix, multiply the elements in row $i$ of the first matrix, $ D$ , with the corresponding elements in column $j$ of the second matrix, $ w$ , and add the products together. So, to find the element at row 1, column 1 of the answer matrix, multiply the first element in ${\text{row }1}$ of $ D$ with the first element in ${\text{column }1}$ of $ w$ , then multiply the second element in ${\text{row }1}$ of $ D$ with the second element in ${\text{column }1}$ of $ w$ , and so on. Add the products together. $ \left[\begin{array}{r}{5}\cdot{4}+{0}\cdot{-2}+{3}\cdot{0} \\ ?\end{array}\right] $ Likewise, to find the element at row 2, column 1 of the answer matrix, multiply the elements in ${\text{row }2}$ of $ D$ with the corresponding elements in ${\text{column }1}$ of $ w$ and add the products together. $ \left[\begin{array}{r}{5}\cdot{4}+{0}\cdot{-2}+{3}\cdot{0} \\ {0}\cdot{4}+{5}\cdot{-2}+{2}\cdot{0}\end{array}\right] $ Fill out the rest: $ \left[\begin{array}{r}{5}\cdot{4}+{0}\cdot{-2}+{3}\cdot{0} \\ {0}\cdot{4}+{5}\cdot{-2}+{2}\cdot{0}\end{array}\right] $ After simplifying, we end up with: $ \left[\begin{array}{r}20 \\ -10\end{array}\right] $